import { app } from 'electron'
import * as path from 'path'
import * as dotenv from 'dotenv'

// 加载环境变量
dotenv.config({ path: path.join(app.getPath('userData'), '.env') })

export const DB_CONFIG = {
  host: process.env.DB_HOST || 'localhost',
  port: parseInt(process.env.DB_PORT || '3306'),
  user: process.env.DB_USER || 'root',
  password: process.env.DB_PASSWORD || '',
  database: process.env.DB_DATABASE || 'pdf_tool',
  waitForConnections: true,
  connectionLimit: 10,
  queueLimit: 0
} 